package com.smzd.framework.security.domain;

import org.springframework.security.core.GrantedAuthority;

import com.smzd.core.domain.BaseIntIdEntity;
import com.smzd.framework.annotation.ModuleGroup;

@ModuleGroup(value = "security", moduleNames = "authorities")
public class Authority extends BaseIntIdEntity implements GrantedAuthority {
    private static final long serialVersionUID = -411036879933504330L;

    private String authority;

    public Authority() {
    }

    public Authority(int id) {
        this.id = id;
    }

    public Authority(String authority) {
        this.authority = authority;
    }

    @Override
    public String getAuthority() {
        return authority;
    }

    public void setAuthority(String authority) {
        this.authority = authority;
    }

    @Override
    protected void extStrings(StringBuffer sb) {
        super.extStrings(sb);
        sb.append(", authority: ").append(authority);
    }

}
